<@page.html title="报表文件一览">
<script type="text/javascript" src="${_appPath!}/js/cal.js"></script>
<script>
  function dlzip() {
    var fm = getEl("fm_query");
    if(fm) {
      var pm = getFormData(fm);
      if(!pm) return;
      var url = "_downloadzip?"+pm.join("&")
      wopen(url);
    }
  }
</script>
  <div class="search">
    <form id="fm_query" action="_list">
      <dl>
        <dt>门店</dt>
        <dd><script>shopsel('shopCode');</script></dd>
        <dt>报表类型</dt>
        <dd><select id="reportFileType" name="reportFileType"><option value="">全部</option><#if reportFileTypeName??><#list reportFileTypeName as t><option value="${t.id}" <#if reportFileType?? && reportFileType=t.id> selected</#if>>${t.id}-${t.name}</option></#list></#if></select></dd>
      </dl>
      <dl>
        <dt>报表生成日期</dt>
        <dd><input type="text" id="dateFrom" class="date" name="dateFrom" value="${dateFrom!}" req="开始日期"  onfocus="cal(this);" />
          ~ <input type="text" id="dateTo" class="date" name="dateTo" value="${dateTo!}" req="结束日期"  onfocus="cal(this);" /></dd>
        <dd class="button"><input type="button" value="查询" onclick="query();"></dd>
        <#if canDownloadzip??><dd class="button"><input type="button" value="打包下载" onclick="dlzip();"></dd></#if>
      </dl>
    </form>
  </div>
  <div id="div_list"></div>
<script type="text/javascript">query();</script>
</@page.html>